package com.ruoyi.category.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.category.mapper.AcupointCategoryMapper;
import com.ruoyi.category.domain.AcupointCategory;
import com.ruoyi.category.service.IAcupointCategoryService;

/**
 * 穴位分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-09
 */
@Service
public class AcupointCategoryServiceImpl implements IAcupointCategoryService 
{
    @Autowired
    private AcupointCategoryMapper acupointCategoryMapper;

    /**
     * 查询穴位分类
     * 
     * @param id 穴位分类主键
     * @return 穴位分类
     */
    @Override
    public AcupointCategory selectAcupointCategoryById(Long id)
    {
        return acupointCategoryMapper.selectAcupointCategoryById(id);
    }

    /**
     * 查询穴位分类列表
     * 
     * @param acupointCategory 穴位分类
     * @return 穴位分类
     */
    @Override
    public List<AcupointCategory> selectAcupointCategoryList(AcupointCategory acupointCategory)
    {
        return acupointCategoryMapper.selectAcupointCategoryList(acupointCategory);
    }

    /**
     * 新增穴位分类
     * 
     * @param acupointCategory 穴位分类
     * @return 结果
     */
    @Override
    public int insertAcupointCategory(AcupointCategory acupointCategory)
    {
        acupointCategory.setCreateTime(DateUtils.getNowDate());
        return acupointCategoryMapper.insertAcupointCategory(acupointCategory);
    }

    /**
     * 修改穴位分类
     * 
     * @param acupointCategory 穴位分类
     * @return 结果
     */
    @Override
    public int updateAcupointCategory(AcupointCategory acupointCategory)
    {
        acupointCategory.setUpdateTime(DateUtils.getNowDate());
        return acupointCategoryMapper.updateAcupointCategory(acupointCategory);
    }

    /**
     * 批量删除穴位分类
     * 
     * @param ids 需要删除的穴位分类主键
     * @return 结果
     */
    @Override
    public int deleteAcupointCategoryByIds(Long[] ids)
    {
        return acupointCategoryMapper.deleteAcupointCategoryByIds(ids);
    }

    /**
     * 删除穴位分类信息
     * 
     * @param id 穴位分类主键
     * @return 结果
     */
    @Override
    public int deleteAcupointCategoryById(Long id)
    {
        return acupointCategoryMapper.deleteAcupointCategoryById(id);
    }
}
